<?php

/* 
 * 订单model 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class OrderInfoModel extends db_help
{
    public $keyFields = 'order_id';//设置主键
    public function __construct() {
        parent::__construct();
        $this->table_name = $this->table('order_info');
    }
    public static function load(){
        return new self();
    }
    public function get_info($order_id) {
        $where = array(
            'order_id' => $order_id,
        );
        return $this->getAll(null, $where);
    }
    /**
     * 更新删除字段。
     * @param type $order_id
     * @return type
     */
    public function update_del($order_id) {
        $where = array(
            'order_id' => $order_id,
        );
        $data = array(
            'is_del' => 1,
        );
        return $this->update($data, $where);
    }
}

